<?php
$delta = db_next_id ('{dvbanner_block}_delta');

db_query (
  "INSERT INTO {dvbanner_block} (delta, type, title, data) VALUES (%d, '%s', '%s', '%s')", 
  $delta, $form_values['type'], $form_values['title'], serialize (array ('limitation' => 1))
);

// Thông báo: đã tạo bannner block thành công
drupal_set_message (t(
	"Created banner block <strong>!title</strong>", 
	array ('!title' => check_plain ($form_values['title']))
));

// redirect to block setting form
drupal_goto ('admin/build/block/configure/dvbanner/' . $delta, 'destination=admin/build/block/dvbanner');
